from setuptools import setup, find_packages
import os
import subprocess

def install_requirements():
    """Install dependencies from requirements.txt using pip3."""
    requirements_file = os.path.join(os.path.dirname(__file__), 'requirements.txt')
    if os.path.exists(requirements_file):
        subprocess.check_call(['pip3', 'install', '-r', requirements_file])
    else:
        print("requirements.txt not found. Skipping installation.")

# Call the function to install requirements
install_requirements()

setup(
    name='monitor_tools',
    version='0.1.0',
    description='Utilities for monitoring GPU and system usage',
    packages=find_packages(exclude=("tests", "docs")),
    include_package_data=True,
    install_requires=[],
    python_requires='>=3.8',
)
